import request from '@/utils/request'

// 相册相关
export default{

  // 分页查询相册列表
  albumList(data = {}) {
    return request({
      url:`/ent/api/album/getAll`,
      method:'post',
      data
    })
  },

  // 根据相册id获取相册中所有的图片
  getAllPicture(data = {}) {
    return request({
      url:`/ent/api/picture/getAll`,
      method:'post',
      data
    })
  },

  // 查询相册详情
  info(id) {
    return request({
      url:`/ent/api/album/info/${id}`,
      method:'get'
    })
  },

  // 移动照片到其他相册时 查询相册列表
  getAlbumList(id) {
    return request({
      url:`/ent/api/album/getAlbumList/${id}`,
      method:'get'
    })
  },

  // 新建相册
  saveAlbum(data) {
    return request({
      url:`/ent/album/save`,
      method:'post',
      data
    })
  },

  // 相册添加照片
  savePicture(data) {
    return request({
      url:`/ent/picture/savePicture`,
      method:'post',
      data
    })
  },

  // 编辑相册
  updateAlbum(data) {
    return request({
      url:`/ent/album/update`,
      method:'put',
      data
    })
  },

  // 删除相册
  deleteAlbum(id) {
    return request({
      url:`/ent/album/delete/${id}`,
      method:'delete'
    })
  },

  // 删除照片
  deletePicture(id) {
    return request({
      url:`/ent/picture/delete/${id}`,
      method:'delete'
    })
  },

  // 批量删除照片
  batchDeletePicture(data) {
    return request({
      url:`/ent/picture/batchDelete`,
      method:'post',
      data
    })
  },

  // 移动照片
  movePicture(data) {
    return request({
      url:`/ent/picture/movePicture`,
      method:'post',
      data
    })
  },







}
